﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
	CodeFile="MenuRights.aspx.cs" Inherits="Catalogs_MenuRights" Title="Untitled Page"
	EnableEventValidation="false" %>

<%@ MasterType VirtualPath="~/MasterPage.master" %>
<%@ Register Namespace="NS_Controls" TagPrefix="cc1" %>
<%@ Register Namespace="CustomControlsNS" TagPrefix="cc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderContent" runat="Server">
	<asp:UpdatePanel ID="up1" runat="server">
		<ContentTemplate>
			<asp:Button ID="btnSave" runat="server" Text="Save all (hidden)" OnClick="btnSave_Click"
				Style="display: none" UseSubmitBehavior="false" />
			<table>
				<tr>
					<td>
						<fieldset border="3px inset" style="padding: 2px 2px 2px 2px;">
							<div>
								<cc1:ExtendedGridView runat="server" ID="grStations" UseDefaultStyle="true" EnableEdit="true"
									ShowEditLink="false" ShowInsertLink="false" AutoSave="true" AllowSorting="true"
									AllowPaging="true" PageSize="10" AutoGenerateColumns="false" DataKeyNames="ID"
									EnableFilter="true" EnablePageSize="true" EnableExport="true">
									<Columns>
										<asp:TemplateField HeaderText="<%$ Resources:GridView, Edit %>">
											<ItemTemplate>
												<asp:ImageButton runat="server" ID="btnEdit" AlternateText="<%$ Resources:GridView, Edit %>"
													ImageUrl="~/Images/Edit.gif" OnClick="btnEdit_Click" />
											</ItemTemplate>
										</asp:TemplateField>
										<asp:BoundField DataField="ID" HeaderText="<%$ Resources:DatabaseStrings, ID %>"
											SortExpression="ID" ReadOnly="true" />
										<asp:BoundField DataField="Doc_Name" HeaderText="<%$ Resources:DatabaseStrings, NameDoc %>"
											SortExpression="Doc_Name" ReadOnly="true" />
										<asp:BoundField DataField="User_Group" HeaderText="<%$ Resources:DatabaseStrings, NameGroup %>"
											SortExpression="User_Group" ReadOnly="true" />
									</Columns>
								</cc1:ExtendedGridView>
								<cc2:CustomButton ID="CustomButtonInsert" runat="server" Text="<%$ Resources:GridView, Insert %>"
									OnServerClick="btnInsert_Click" />
							</div>
						</fieldset>
					</td>
				</tr>
			</table>
			<br />
			<asp:Label ID="lblExplanations" runat="server" CssClass="Explicatii" Text="<%$ Resources:DatabaseStrings, ATTENTION_Important_Data %>" />
		</ContentTemplate>
	</asp:UpdatePanel>
	<asp:Button ID="btnShowPopup" runat="server" Style="display: none" />
	<ajaxToolKit:ModalPopupExtender ID="mdlPopup" runat="server" TargetControlID="btnShowPopup"
		PopupControlID="pnlPopup" CancelControlID="CancelButton1" BackgroundCssClass="modalBackground"
		PopupDragHandleControlID="pnDragHandleSelection1">
	</ajaxToolKit:ModalPopupExtender>
	<asp:Panel ID="pnlPopup" runat="server" CssClass="modalPopup" Style="display: none;"
		Width="500px">
		<asp:Table runat="server" ID="tblTitle1" Style="background-color: #DDDDDD; border: solid 1px Gray;
			width: 500px">
			<asp:TableRow>
				<asp:TableCell Width="100%" HorizontalAlign="Center">
					<asp:Panel runat="server" ID="pnDragHandleSelection1" Style="cursor: move;">
						<b>
							<% =Resources.DatabaseStrings.Edit %></b>
					</asp:Panel>
				</asp:TableCell>
				<asp:TableCell>
					<asp:Image ID="CancelButton1" AccessKey="c" runat="server" ImageUrl="~/Images/Tools/gr_del_line.jpg"
						Style="cursor: pointer" title="<%$ Resources:DatabaseStrings, Close %>" />
				</asp:TableCell>
			</asp:TableRow>
		</asp:Table>
		<br />
		<asp:UpdatePanel ID="up2" runat="server" UpdateMode="Conditional">
			<ContentTemplate>
				<table border="0" cellpadding="3" cellspacing="0" width="100%">
					<tr>
						<td>
							<td>
								<asp:Label ID="lblUser" runat="server" ForeColor="Red" />
							</td>
							<asp:DetailsView ID="dvUsersDetail" runat="server" DefaultMode="Edit" DataKeyNames="ID"
								GridLines="Both" BorderColor="#E7E7FF" BorderStyle="Solid" BorderWidth="1px"
								AutoGenerateRows="false" Width="100%" OnDataBound="dvUsersDetail_DataBound">
								<RowStyle CssClass="RowStyleClass" />
								<AlternatingRowStyle CssClass="AlternatingRowStyleClass" />
								<Fields>
									<asp:BoundField DataField="ID" HeaderText="<%$ Resources:DatabaseStrings, ID %>"
										ReadOnly="true" />
									<asp:TemplateField HeaderText="<%$ Resources:DatabaseStrings, NameDoc %>" ControlStyle-Width="350px">
										<EditItemTemplate>
											<asp:DropDownList ID="ddlDoc" runat="server" />
										</EditItemTemplate>
									</asp:TemplateField>
									<asp:TemplateField HeaderText="<%$ Resources:DatabaseStrings, NameGroup %>" ControlStyle-Width="350px">
										<EditItemTemplate>
											<asp:DropDownList ID="ddlUser" runat="server" />
										</EditItemTemplate>
									</asp:TemplateField>
								</Fields>
							</asp:DetailsView>
						</td>
					</tr>
				</table>
				<div align="center">
					<cc2:CustomButton ID="btnSave2" runat="server" Text="<%$ Resources:DatabaseStrings, btn_Modify %>"
						OnServerClick="btnSave2_Click" />
					<cc2:CustomButton ID="btnAdd" runat="server" Text="<%$ Resources:DatabaseStrings, btn_Add %>"
						OnServerClick="btnAdd_Click" />
					&nbsp;&nbsp;&nbsp;
					<cc2:CustomButton ID="btnDelete" runat="server" Text="<%$ Resources:DatabaseStrings, btn_Delete %>"
						OnServerClick="btnDelete_Click" OnClick='if (!confirm(g_str_CONFIRM_ValidateAnswer)) return false;' />
					&nbsp;&nbsp;&nbsp;
					<cc2:CustomButton ID="btnClose" runat="server" Text="<%$ Resources:DatabaseStrings, Close %>" />
				</div>
			</ContentTemplate>
		</asp:UpdatePanel>
	</asp:Panel>

	<script type="text/javascript">
	var g_str_CONFIRM_ValidateAnswer = '<% =Resources.DatabaseStrings.CONFIRM_DeleteRow %>';
	</script>

</asp:Content>
